class Solution:
    def twoSum(self, nums, target):
        n = len(nums)
        for i in range(n):
            for j in range(i + 1, n):
                if nums[i] + nums[j] == target:
                    return [i, j]
        return []

def main():
    target = 9
    nums = [2, 7, 11, 15]  # 修正了测试用例，2+7=9
    solution = Solution()    # 创建Solution类的实例
    print(solution.twoSum(nums, target))  # 通过实例调用方法

if __name__ == "__main__":
    main()